 // 工厂模式
 class Point{

 }
class PointBuilder{
    public static Point makePointByXY(double x, double y){
        //在普通方法里面创建对象  之后返回
        Point p = new Point();
        //p.setX(x);
        //p.setY(y);
        return p;
    }
    public static Point makePointByRA(double r, double a){
        Point p = new Point();
        //p.setR(r);
        //p.setA(a);
        return p;
    }
 }
 public class Demo32 {
     public static void main(String[] args) {
         //不通过构造方法来创建对象 因为此处无法发生重载！
         PointBuilder.makePointByRA(10,20);
         PointBuilder.makePointByRA(10,20);

     }
}
